CC=gcc
CFLAGS=-Wall -std=gnu99

TARGET=start
SRCS = main.c \
  ./UserInformation.pb.c \
  ./nanopb_common/pb_common.c \
  ./nanopb_common/pb_decode.c \
  ./nanopb_common/pb_encode.c

INC = -I./ -I./nanopb_common

OBJS = $(SRCS:.c=.o)

$(TARGET):$(OBJS)
#	@echo TARGET:$@
#	@echo OBJECTS:$^
	$(CC) -o $@ $^

clean:
	rm -rf $(TARGET) $(OBJS)

%.o:%.c
	$(CC) $(CFLAGS) $(INC) -o $@ -c $<
